import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import "@css/common.less";
import "./index.less";
import App from "@router";
import store from "./redux/store";
import { Provider } from "react-redux";
import "@depjs/rem.js";

const wrap = document.querySelector("#root");
const root = ReactDOM.createRoot(wrap);
root.render(
    <React.StrictMode>
        {<Provider store={store}>
            <BrowserRouter>
                <App />
            </BrowserRouter>
        </Provider>}
    </React.StrictMode>
);

/**
 * 以下为测试代码
 * 使用测试代码时，需将上面的代码都注释掉，以免冲突
 */

// import React from 'react';
// import ReactDOM from 'react-dom/client';
// import './index.less';
// import TestSocketIOClient from './test/socketio-client'

// const wrap = document.querySelector('#root')
// const root = ReactDOM.createRoot(wrap)
// root.render(<TestSocketIOClient />)
